tests: Remove orientation from testvolumebutton
authorAlexander Mikhaylenko <alexm@gnome.org>
Mon, 11 May 2020 14:53:31 +0000 (19:53 +0500)
committerAlexander Mikhaylenko <alexm@gnome.org>
Mon, 11 May 2020 14:53:31 +0000 (19:53 +0500)
GtkVolumeButton isn't orientable anymore.

tests/testvolumebutton.c

index 5a3b31f04909c4422745834b1a61057c1f654dc8..bb38c8c30689954e712d156ab57258080c3f48ca 100644 (file)
@@ -25,23 +25,6 @@ value_changed (GtkWidget *button,
   g_message ("volume changed to %f", volume);
 }
 
-static void
-toggle_orientation (GtkWidget *button,
-                    GtkWidget *scalebutton)
-{
-  if (gtk_orientable_get_orientation (GTK_ORIENTABLE (scalebutton)) ==
-      GTK_ORIENTATION_HORIZONTAL)
-    {
-      gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
-                                        GTK_ORIENTATION_VERTICAL);
-    }
-  else
-    {
-      gtk_orientable_set_orientation (GTK_ORIENTABLE (scalebutton),
-                                        GTK_ORIENTATION_HORIZONTAL);
-    }
-}
-
 static void
 response_cb (GtkDialog *dialog,
              gint       arg1,
@@ -78,7 +61,6 @@ main (int    argc,
   GtkWidget *window;
   GtkWidget *button;
   GtkWidget *button2;
-  GtkWidget *button3;
   GtkWidget *box;
   GtkWidget *vbox;
 
@@ -100,18 +82,7 @@ main (int    argc,
   gtk_container_add (GTK_CONTAINER (box), button);
   gtk_container_add (GTK_CONTAINER (box), button2);
 
-  button3 = gtk_button_new_with_label ("Toggle orientation");
-  gtk_container_add (GTK_CONTAINER (box), button3);
-
-  g_signal_connect (G_OBJECT (button3), "clicked",
-                    G_CALLBACK (toggle_orientation),
-                    button);
-  g_signal_connect (G_OBJECT (button3), "clicked",
-                    G_CALLBACK (toggle_orientation),
-                    button2);
-
   gtk_widget_show (window);
-  g_signal_emit_by_name (button, "clicked");
   g_timeout_add (4000, (GSourceFunc) show_error, window);
 
   while (TRUE)